

#ifndef _ADZUKIFILE_H_
#define _ADZUKIFILE_H_

#include <cstdint>
#include <string>


	class FileMappingImpl;

	class File
	{
	public:
		enum OpenMode
		{
			eRead = 0x00000001,
			eWrite = 0x00000002
		};
		enum Pos
		{
			eBegin,
			eCurrent,
			eEnd
		};
	public:
		File();
		~File();
	public:
		bool Open(std::string const &strFileName, File::OpenMode eMode);
		bool Create(std::string const &strFileName, File::OpenMode eMode);
		bool IsOpen();
		void Close();
		bool IsEmpty();
		std::uint16_t Size();
	public:
		void Read(void* lpData, int n);
		void Write(void* lpData, int n);
		void Append(void* lpData, int n);
		bool Seek(std::uint64_t nOffset, File::Pos ePos);
	public:
		FileMappingImpl* m_pImpl;
	};


#endif

